package com.garrett.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication
public class SmallLoginApplication implements CommandLineRunner {

    @Value("${server.port}")
    private String serverPort;

    @Value("${server.servlet.context-path}")
    private String serverContextPath;

    public static void main(String[] args) {
        SpringApplication.run(SmallLoginApplication.class, args);
    }

    @Override
    public void run(String... strings){
        log.info("=======================Application Startup Success=======================");
        log.info("Chinese Test >> 中文测试 : UTF-8");
        log.info("RESTful Api Docs >> http://127.0.0.1:{}{}/swagger-ui/index.html", serverPort, serverContextPath);
        log.info("=======================Application Startup Success=======================");
    }
}
